package org.example.infrastructure.repository;

import lombok.RequiredArgsConstructor;
import org.example.domain.system.model.UserAccount;
import org.example.infrastructure.persistence.RemoteUserAccountPersistence;
import org.example.web.result.ResultInfo;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
@RequiredArgsConstructor
public class RemoteUserAccountRepository {
    private final RemoteUserAccountPersistence remoteUserAccountPersistence;

    public Optional<ResultInfo<UserAccount>> getUserByUserName(String userName) {
        return this.remoteUserAccountPersistence.getUserByUserName(userName);
    }
}
